package com.jsb.laundry.model.shops;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 店铺订单列表视图
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class ShopOrderDetailVo implements Serializable {

    private static final long serialVersionUID = 701700696615489655L;

    private String uid;
    /**
     * 订单信息
     */
    private OrderInfo orderInfo;

    /**
     * 运单信息
     */
    private List<TransportInfo> transportInfo;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Accessors(chain = true)
    public static class OrderInfo {
        @ApiModelProperty(value = "订单编号")
        private String orderId;

        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @ApiModelProperty(value = "下单时间")
        private Date paidAt;

        @ApiModelProperty(value = "订单金额")
        private String paidPrice;

        @ApiModelProperty(value = "衣物数量")
        private String num;

    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Accessors(chain = true)
    public static class TransportInfo {

        @ApiModelProperty(value = "运单编号")
        private String transportId;

        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @ApiModelProperty(value = "送达时间")
        private Date createdAt;

        @ApiModelProperty(value = "衣物数量")
        private String num;

        @ApiModelProperty(value = "洗护类型(描述)")
        private String washingType;

        @ApiModelProperty(value = "订单金额")
        private String paidPrice;
        @ApiModelProperty(value = "运费")
        private String shippingPrice;

        @ApiModelProperty(value = "服务站点(店铺名)")
        private String shopsName;

        @ApiModelProperty(value = "当前状态")
        private String orderStatus;

        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @ApiModelProperty(value = "入库时间")
        private Date inAt;


        @ApiModelProperty(value = "清洗状态")
        private String washingStatus;

        @ApiModelProperty(value = "配送员姓名")
        private String riderName;

        @ApiModelProperty(value = "骑手手机号")
        private String riderPhone;

        /**
         * 物流方向 1送 2回
         */
        private String trackingDirection;

    }

}
